// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */
// 商品管理
import Goods from '@/views/goods/Goods';
import Audit from '@/views/audit/audit';

// 机器信息管理
import Machine from '@/views/machine/Machine';
// 货道信息管理
import MachineAisle from '@/views/machine/MachineAisle';
/**
 * 订单管理
 */
// 交易订单
import Order from '@/views/pay/Order';
/**
 * 系统管理
 */
// 用户管理
import user from '@/views/system/user';
// 菜单管理
import Module from '@/views/system/Module';
// 角色管理
import Role from '@/views/system/Role';
// 公司管理
import Dept from '@/views/system/Dept';
// 系统环境变量
import Variable from '@/views/system/Variable';
// 权限管理
import Permission from '@/views/system/Permission';
/**
 * 支付管理
 */
// 支付配置信息
import MachineConfig from '@/views/machine/MachineConfig';
// 支付配置
import Config from '@/views/pay/Config';
/**
 * 数据监控
 */
// 监控查询
import druidLogin from '@/views/druid/login';

// 图表界面
import statistics from '@/views/charts/statistics';

//仓库管理
import CkAdmin from '@/views/KcAdmin/CkAdmin';
//出库单
import OutOrder from '@/views/KcBill/OutOrder';
//入库单
import EnterOrder from '@/views/KcBill/EnterOrder';
//采购订单
import CaiGouOrder from '@/views/CaiGou/CaiGouOrder';
//采购入库
import ProcurementAndStorage from '@/views/CaiGou/ProcurementAndStorage';
//采购退货
import PurchaseReturn from '@/views/CaiGou/PurchaseReturn';
//应付款
import AccountPayable from '@/views/CaiGou/AccountPayable';
//采购付款
import PurchasingPayment from '@/views/CaiGou/PurchasingPayment';
// 采购计划
import CaiGouPlan from '@/views/CaiGou/CaiGouPlan';



// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [
            {
                path: '/audit/audit',
                name: '审核管理',
                component: Audit,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/goods/goods',
                name: '商品管理',
                component: Goods,
                meta: {
                    requireAuth: true
                }
            },
          
            {
                path: '/caigou/caigouPlan',
                name: '采购计划',
                component: CaiGouPlan,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/caigou/caigouOrder',
                name: '采购订单',
                component: CaiGouOrder,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/caigou/procurementAndStorage',
                name: '采购入库',
                component: ProcurementAndStorage,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/caigou/purchaseReturn',
                name: '采购退货',
                component: PurchaseReturn,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/caigou/accountPayable',
                name: '应付款',
                component: AccountPayable,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/caigou/purchasingPayment',
                name: '采购付款',
                component: PurchasingPayment,
                meta: {
                    requireAuth: true
                }
            },
            
            {
                path: '/machine/Machine',
                name: '机器信息管理',
                component: Machine,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/machine/MachineAisle',
                name: '货道信息管理',
                component: MachineAisle,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/pay/Order',
                name: '交易订单',
                component: Order,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/user',
                name: '用户管理',
                component: user,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/Module',
                name: '菜单管理',
                component: Module,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/Role',
                name: '角色管理',
                component: Role,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/Dept',
                name: '公司管理',
                component: Dept,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/Variable',
                name: '系统环境变量',
                component: Variable,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/Permission',
                name: '权限管理',
                component: Permission,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/machine/MachineConfig',
                name: '支付配置信息',
                component: MachineConfig,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/pay/Config',
                name: '支付配置',
                component: Config,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/druid/login',
                name: '监控查询',
                component: druidLogin,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/charts/statistics',
                name: '数据可视化',
                component: statistics,
                meta: {
                    requireAuth: true
                }
            },//wangchenlong负责模块代码开始块
            {
                path: '/KcAdmin/CkAdmin',
                name: '仓库管理',
                component: CkAdmin,
                meta: {
                    requireAuth: true
                }
            },                    
            {
                path: '/KcBill/OutOrder',
                name: '出库单',
                component: OutOrder,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/KcBill/EnterOrder',
                name: '入库单',
                component: EnterOrder,
                meta: {
                    requireAuth: true
                }
            }//wangchenlong负责模块代码结束块
        ]
    }]
})